import http from '@/utils/http/axios'
import { BasicResponseModel } from '@/api/model/baseModel'

/**
 * @description: 修改员工信息
 */
export function operatorSave(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/account/save',
    method: 'POST',
    params
  })
}
/**
 * @description: 删除员工
 */
export function operatorDelete(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/account/delete',
    method: 'POST',
    params
  })
}
/**
 * @description: 获取员工详情
 */
export function operatorDetail(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/account/detail',
    method: 'GET',
    params
  })
}
/**
 * @description: 获取员工列表
 */
export function accountList(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/account/list',
    method: 'GET',
    params
  })
}

/**
 * @description: 删除员工
 */
export function accountDelete(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/account/delete',
    method: 'POST',
    params
  })
}
/**
 * @description: 更新状态
 */
export function accountStatus(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/account/status',
    method: 'POST',
    params
  })
}
/**
 * @description: 获取岗位列表
 */
export function roleList(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/role/list',
    method: 'GET',
    params
  })
}
/**
 * @description: 资源列表
 */
export function getSystemAuthority(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/role/resource/list',
    method: 'GET',
    params
  })
}
/**
 * @description: 岗位详情
 */
export function getSystemRleDetail(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/role/detail',
    method: 'GET',
    params
  })
}
/**
 * @description: 保存自定义岗位
 */
export function getSystemRleSave(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/role/save',
    method: 'POST',
    params
  })
}
/**
 * @description: 内置岗位保存
 */
export function getSystemRleNativeSave(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/role/native/save',
    method: 'POST',
    params
  })
}
/**
 * @description: 删除岗位
 */
export function getSystemRleDelete(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/role/delete',
    method: 'POST',
    params
  })
}
/**
 * @description: 账户列表
 */
export function mediaAccountList(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/media-account/list',
    method: 'GET',
    params
  })
}
/**
 * @description: 账户列表-批量分配员工
 */
export function mediaAccountBatchChange(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/media-account/batch/change',
    method: 'POST',
    params
  })
}
/**
 * @description: 获取授权地址
 */
export function mediaAccountGetRedirectUri() {
  return http.request<BasicResponseModel>({
    url: '/api/media-account/getRedirectUri',
    method: 'GET'
  })
}
/**
 * @description: 账户列表-搜索条件-账户主体列表
 */
export function mediaAccountMdmNameList() {
  return http.request<BasicResponseModel>({
    url: '/api/media-account/mdmName/list',
    method: 'GET'
  })
}
/**
 * @description: 账户列表-授权列表
 */
export function mediaAccountMediaList(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/media-account/mediaList',
    method: 'GET',
    params
  })
}
/**
 * @description: 账户列表-批量导入
 */
export function mediaAccountBatchExport(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/media-account/batch/export',
    method: 'POST',
    params
  })
}

/**
 * @description: 账户列表-批量删除
 */
export function mediaAccountDelete(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/media-account/delete',
    method: 'POST',
    params
  })
}
/**
 * @description: 账户列表-授权失败列表
 */
export function mediaAccountFailList(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/media-account/failList',
    method: 'GET',
    params
  })
}
/**
 * @description: 部门列表
 */
export function departmentList(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/department/list',
    // url: 'https://yapi.madaomall.com/mock/207/department/list',
    method: 'GET',
    params
  })
}
/**
 * @description: 保存部门
 */
export function departmentSave(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/department/save',
    method: 'POST',
    params
  })
}
/**
 * @description: 删除部门
 */
export function departmentDelete(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/department/delete',
    method: 'POST',
    params
  })
}
